#通过__all__限制其他模块引用该模块内容的范围,只对from 模块名 import *这种导入方式生效
__all__ = ['add','minus']

name = 'gaoyingjun'
number = 10

def add(*args):
    sum = 0
    if len(args) > 1:
        for i in args:
            sum += i
        return sum
    else:
        print("请输入两个数以上")

def minus(*args):
    sum=0
    if len(args) > 1:
        for i in args:
            sum -=i
        return sum
    else:
        print("请输入两个数以上")

def multify(*args):
    pass

def divide(*args):
    pass


class Calculate:
    def __init__(self,num):
        self.num = num
    def test(self):
        print("调用test函数")
    @classmethod
    def test2(cls):
        print("调用类方法")

def hobby():
    print('显示爱好的函数')
print('__name__:',__name__)
#为了hobby函数只有在calculate.py本模块中运行才执行，在其他模块不执行，需要加__name__ = '__main__'判断
if __name__ == '__main__':
    hobby()